package RLK_ZIP;

import java.io.IOException;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class Example {
    public static Collection<String> findDeprecated(final Properties properties) throws IOException {
        final List<String> list = new ArrayList<String>();
        final ZipFile doczipFile = new ZipFile(properties.getProperty("doczip"));

        final Enumeration<? extends ZipEntry> entries = doczipFile.entries();
        while (entries.hasMoreElements()) {
            final ZipEntry entry = entries.nextElement();
            final String name = entry.getName();
            if (name.matches(".*_DEPRECATED_.*")) {
                list.add(name);
            }
        }

        return list;
    }
}
